package models;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 文件模型
 * 
 * @author ultrafrog
 * @version 1.0, 2014-11-07
 * @since 1.0
 */
@Entity
@Table(name = "uwx_file")
public class File extends Model {

	/** 名称 */
	@Column(name = "vc_name")
	public String name;
	
	/** 扩展名 */
	@Column(name = "vc_ext")
	public String ext;
	
	/** 媒体类型 */
	@Column(name = "vc_mime_type")
	public String mimeType;
	
	/** 大小 */
	@Column(name = "nb_size")
	public BigDecimal size;
	
	/** 路径 */
	@Column(name = "vc_path")
	public String path;
	
	/** 构造函数 */
	public File() {}
	
	/**
	 * 构造函数 
	 * 
	 * @param name
	 * @param ext
	 * @param mimeType
	 * @param size
	 * @param path
	 */
	public File(String name, String ext, String mimeType, BigDecimal size, String path) {
		this.name = name;
		this.ext = ext;
		this.mimeType = mimeType;
		this.size = size;
		this.path = path;
	}
}
